<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
      "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html   xmlns="http://www.w3.org/1999/xhtml"
        xmlns:ui="http://java.sun.com/jsf/facelets"
        xmlns:h="http://java.sun.com/jsf/html"
        xmlns:rich="http://richfaces.org/rich"
        xmlns:a4j="http://richfaces.org/a4j"
        xmlns:f="http://xmlns.jcp.org/jsf/core">
    
    <ui:composition template="template.xhtml">
        <ui:define name="title">
            <h:outputText value="ABC Web - Report"/>
        </ui:define>
        
        <ui:define name="header">
            <ui:include src="top.xhtml"/>
        </ui:define>
        
        <ui:define name="content">
            <h:panelGrid columns="2" width="100%" columnClasses="leftmenu, contentplace">
                <rich:panel header="Places">
                    <h:form>
                        <rich:panelMenu style="width: 170px">
                            <a4j:repeat value="#{reportService.cityTree}" var="menuItem">
                                <rich:panelMenuGroup label="#{menuItem.label}">
                                    <a4j:repeat value="#{menuItem.subMenuItemList}" var="subMenuItem">
                                        <rich:panelMenuItem label="#{subMenuItem.label}" render="reportpanel" onbeforedomupdate="#{reportService.setId(subMenuItem.id)}"/>
                                    </a4j:repeat>
                                </rich:panelMenuGroup>
                            </a4j:repeat>
                        </rich:panelMenu>
                    </h:form>
                </rich:panel>
                <rich:panel header="Report" id="reportpanel">
                    <h:panelGrid>
                        <h:panelGrid columns="2">
                            <h:outputText value="Writer:"/>
                            <h:outputText value="#{reportService.author}"/>
                            <h:outputText value="Created:"/>
                            <h:outputText value="#{reportService.created}">
                                <f:convertDateTime pattern="yyyy-MM-dd" timeZone="MEZ" type="date"/>
                            </h:outputText>
                            <h:outputText value="Modified:"/>
                            <h:outputText value="#{reportService.modified}">
                                <f:convertDateTime pattern="yyyy-MM-dd" timeZone="MEZ" type="date"/>
                            </h:outputText>
                        </h:panelGrid>
                        <h:outputText class="caption" escape="false" value="#{reportService.caption}"/>
                        <h:outputText escape="false" value="#{reportService.content}"/>
                    </h:panelGrid>
                </rich:panel>
            </h:panelGrid>
        </ui:define>
    </ui:composition>
</html>